package com.car.loan.project.xr.util.vo.after;

import com.car.loan.project.xr.util.enums.OverdueCustomerImportStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * @author huangding
 * @date 2020/2/26 15:31
 */
@Data
public class OverdueImportLogVo {


    @ApiModelProperty("导入状态 1=匹配2=不匹配")
    private String status;

    @ApiModelProperty("导入时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime importTime;

    @ApiModelProperty("数据日期")
    private String dataDate;

    @ApiModelProperty("银行")
    private String bankName;

    @ApiModelProperty("客户姓名")
    private String customerName;

    @ApiModelProperty("卡号(身份证，银行卡)")
    private String cardNo;

    @ApiModelProperty("逾期期数")
    private Integer item;

    @ApiModelProperty("应还金额")
    private Double payableAmount;

    @ApiModelProperty("错误原因")
    private String errorMsg;

    public String getStatus() {
        if (status.equals(String.valueOf(OverdueCustomerImportStatus.SUCCESS.ordinal()))) {
            return "匹配成功";
        } else if (status.equals(String.valueOf(OverdueCustomerImportStatus.ERROR.ordinal()))) {
            return "匹配失败";
        } else {
            return "人工录入";
        }
    }
}
